import React from "react";

import { useSelector, useDispatch } from "react-redux";

export default function Footer() {
  const count = useSelector((state) => state.count);
  const dispatch = useDispatch();

  return (
    <div>
      <h1>Footer - {count}</h1>
      <button
        onClick={() => {
          dispatch({ type: "increment" });
        }}
      >
        +
      </button>
    </div>
  );
}
